//
//  NewUITextField.m
//  sensen_ios
//
//  Created by mc on 16/3/9.
//  Copyright © 2016年 pro. All rights reserved.
//

#import "NewUITextField.h"

@implementation NewUITextField

- (id)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
       
        self.backgroundColor = rgba(238, 239, 240, 1);
        //标签
        self.headLabel = [[UILabel alloc] init];
        self.headLabel.font = FONT(15);
        self.headLabel.textColor = [UIColor blackColor];
        [self  addSubview:self.headLabel];
        [self.headLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self.mas_centerY);
            make.left.equalTo(self).offset(20);
            make.size.mas_equalTo(CGSizeMake(80, frame.size.height));
            
        }];
        self.headLabel.backgroundColor = rgba(238, 239, 240, 1);
        //输入框
        self.textField = [[UITextField alloc] init];
        self.textField.font = FONT(15);
        self.textField.borderStyle = UITextBorderStyleNone;
        [self addSubview:self.textField];
        [self.textField mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self.mas_centerY);
            make.left.equalTo(self.headLabel.mas_right).offset(20);
            make.size.mas_equalTo(CGSizeMake(SCREEN_WIDTH - 80 - 60, frame.size.height));
        }];
        
        self.textField.backgroundColor = rgba(238, 239, 240, 1);

    }
    return self;
}


@end
